chrome.notifications.onClicked.addListener(function (url) {
    window.open("spiderByM3u8:?&" + url);
});
chrome.webRequest.onBeforeRequest.addListener(
    details => {
        let url = details.url;
        if (url.match("^http\\S*\\.m3u8$") != null) {
            chrome.notifications.create(url, {
                type: 'basic',
                iconUrl: 'img/icon.png',
                title: 'M3U8文件',
                message: "点击解析下载"
            });
        }
    },
    {urls: ["<all_urls>"]},
    ["blocking"]
);